<?php

namespace home\models;

use Yii;
use yii\behaviors\TimestampBehavior;
use yii\helpers\ArrayHelper;

/**
 * This is the model class for table "{{%orders}}".
 *
 * @property string $id 订单 ID
 * @property string $user_id 用户 ID
 * @property int $created_at 创建时间
 * @property int $updated_at 修改时间
 * @property int $status 状态
 */
class Orders extends \common\models\Orders
{

    const STATUS_NEW = 0;

    public function rules()
    {
        return ArrayHelper::merge(parent::rules(), [
            ['status', 'default', 'value' => self::STATUS_NEW],
        ]);
    }

    public function behaviors()
    {
        return [
            TimestampBehavior::className(),
        ];
    }
}
